#ifndef TCP_DECODER_H
#define TCP_DECODER_H

#include "netstruct.h"

class TcpDecoder
{
public:
	//Constructor
	TcpDecoder();
	TcpDecoder(const u_char* packetcontent);
	~TcpDecoder();
	
	//Getting decode data
	unsigned short GetSrcPort();
	unsigned short GetDstPort();
	unsigned int GetSeqNum();
	unsigned int GetNextSeq();
	unsigned int GetAckNum();
	unsigned int GetWindowSize();
	unsigned int GetChecksum();
	
protected:
	//Getting private member
	tcphdr * GetTcpHead();
	
private:
	tcphdr * pTcpHead;
	iphdr * pIpHead;   //For calculate the next sequence number.
};


#endif